package kr.hkit.powerjava.chapter06.submit;

import java.util.Scanner;

public class programming05 {
	public static void main(String[] args) {
		
		double x;
		
		Scanner input = new Scanner (System.in);
		System.out.print("숫자를 입력하시오: ");
		x = input.nextDouble();
		
		if (x <= 0) {
			x = (x*x*x) - (9*x) + 2;
			System.out.printf("결과값은 %.2f입니다. \n", x);
		} else if (x > 0) {
			x = (7*x) + 2;
			System.out.printf("결과값은 %.2f입니다. \n", x);
		}
	}
}
